add: tree layout for sitemap#115
Conversation
- Use the percent representation in sitemap urls to avoid "naughty" filenames and dirnames. - The "tree" layout for sitemap is to render the directories where the org files reside, which may be useful for some who want their sitemap more organized.
|
A picture is worth a thousand words: |
|
Hi there! Thanks for making a PR. This is a bit of a complex one for me, so I'm going to have to pull down the code and test it. For some context, from a product side, In previous versions of Firn I tried enabling rendering of the sitemap as a tree-ish structure through the use of a I have not looked at this codebase for a few months, so I'll need to test this locally when I have a chance; It might not be until the end of this week or next week, unfortunately. Hopefully you don't mind waiting. I have two requests:
|
Sure! I deploy my own version of firn so it's not huge problem for me if the patch has not been merged to
I will try to come up some tests when I am free :)
Let's say I have a file structure like this: On current master branch, the link will be rendered like: Another example is when the org file is called: |
fix issues with unusual filenames and dirnames (e.g. consisting of spaces)
The "tree" layout for sitemap is to render the directories where
the org files reside, which may be useful for some who want their
sitemap more organized.
To use the layout, simply change
sitemap.layoutinconfig.yamlto
"tree". Any values other than that will fall back to the default layout.Currently this layout sorts the files by their real path on the machine
rather than by their titles, so if the titles are not consistent with their
filenames, the sitemap will probably be different in that case.
This pr also uses the percent representation in sitemap urls. It fixes
the broken link issue if the filenames and dirnames have space, question
mark, etc.